package com.wanjian.sak.config;

import android.content.Context;
import android.graphics.drawable.Drawable;


import com.wanjian.sak.layer.Layer;

import java.util.ArrayList;
import java.util.List;

public class Config {
    List<Item> mLayerList;

    private Config(Build build) {
        mLayerList = build.mLayerList;
    }

    public List<Item> getLayerList() {
        return mLayerList;
    }




    public static class Build {
        Context mContext;
        List<Item> mLayerList = new ArrayList<>();

        public Build(Context context) {
            mContext = context.getApplicationContext();
        }

        public Build addLayer(Class<? extends Layer> clz, Drawable icon, String iconName, boolean enable) {
            mLayerList.add(new Item(clz, icon, iconName, enable));
            return this;
        }

        public Config build() {
            return new Config(this);
        }
    }
}
